import transitionTypeEnum from "../enum/transitionType.enum"
import Command from "./command"

export class TagsToggleCommand extends Command {
  constructor(opened: any) {
    super()
    this.payload = { opened }
  }
}
export class OpenTagCommand extends Command {
  constructor(id: string, transition: number, attachmentId: string, listIndex = -1) {
    super()
    this.payload = {
      id: id,
      listIndex,
      transition,
      attachmentId
    }
  }
}
export class SelectTagCommand extends Command {
  constructor(id: any, transition = transitionTypeEnum.Instant) {
    super()
    this.payload = { id, transition }
  }
}
export class PreviewTagCommand extends Command {
  constructor(id: any) {
    super()
    this.payload = { id }
  }
}
export class CloseTagCommand extends Command {
  constructor() {
    super()
  }
}
export class ToggleTagVisibilityCommand extends Command {
  constructor(id: any, visible: any) {
    super()
    this.payload = { id, visible }
  }
}
export class ToggleTagToolEditorCommand extends Command {
  constructor(opened: any) {
    super()
    this.payload = { opened }
  }
}
export class SaveTagAppearanceCommand extends Command {
  constructor(id: any, properties: any) {
    super()
    this.payload = { id, properties }
  }
}
